Use glnx_unref_object instead of gs_unref_object
authorMatthew Barnes <mbarnes@redhat.com>
Tue, 5 May 2015 14:33:53 +0000 (10:33 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Thu, 7 May 2015 02:07:04 +0000 (22:07 -0400)
For non-GIO object types, at least until autocleanup support for GObject
based types becomes more widespread.

48 files changed:
src/libostree/ostree-bootloader-grub2.c
src/libostree/ostree-deployment.c
src/libostree/ostree-fetcher.c
src/libostree/ostree-mutable-tree.c
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-libarchive.c
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo.c
src/libostree/ostree-sysroot-cleanup.c
src/libostree/ostree-sysroot-deploy.c
src/libostree/ostree-sysroot-upgrader.c
src/libostree/ostree-sysroot.c
src/ostree/ot-admin-builtin-cleanup.c
src/ostree/ot-admin-builtin-deploy.c
src/ostree/ot-admin-builtin-diff.c
src/ostree/ot-admin-builtin-init-fs.c
src/ostree/ot-admin-builtin-os-init.c
src/ostree/ot-admin-builtin-set-origin.c
src/ostree/ot-admin-builtin-status.c
src/ostree/ot-admin-builtin-switch.c
src/ostree/ot-admin-builtin-undeploy.c
src/ostree/ot-admin-builtin-upgrade.c
src/ostree/ot-admin-instutil-builtin-grub2-generate.c
src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
src/ostree/ot-admin-instutil-builtin-set-kargs.c
src/ostree/ot-builtin-cat.c
src/ostree/ot-builtin-checkout.c
src/ostree/ot-builtin-commit.c
src/ostree/ot-builtin-config.c
src/ostree/ot-builtin-diff.c
src/ostree/ot-builtin-fsck.c
src/ostree/ot-builtin-gpg-sign.c
src/ostree/ot-builtin-init.c
src/ostree/ot-builtin-log.c
src/ostree/ot-builtin-ls.c
src/ostree/ot-builtin-prune.c
src/ostree/ot-builtin-pull-local.c
src/ostree/ot-builtin-pull.c
src/ostree/ot-builtin-refs.c
src/ostree/ot-builtin-reset.c
src/ostree/ot-builtin-rev-parse.c
src/ostree/ot-builtin-show.c
src/ostree/ot-builtin-static-delta.c
src/ostree/ot-builtin-summary.c
src/ostree/ot-builtin-trivial-httpd.c
src/ostree/ot-editor.c
src/ostree/ot-main.c
tests/test-mutable-tree.c

index f237e3d69fd456ab2a80613bac6fc202ab215dcf..d002995365dc560bd4d152aeb1cde0a12999063f 100644 (file)
@@ -294,8 +294,8 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader      *bootloader,
   g_autoptr(GFile) efi_new_config_temp = NULL;
   g_autoptr(GFile) efi_orig_config = NULL;
   g_autoptr(GFile) new_config_path = NULL;
-  gs_unref_object GSSubprocessContext *procctx = NULL;
-  gs_unref_object GSSubprocess *proc = NULL;
+  glnx_unref_object GSSubprocessContext *procctx = NULL;
+  glnx_unref_object GSSubprocess *proc = NULL;
   gs_strfreev char **child_env = g_get_environ ();
   g_autofree char *bootversion_str = g_strdup_printf ("%u", (guint)bootversion);
   g_autoptr(GFile) config_path_efi_dir = NULL;
index 85e8e4bc17f7dff7afafd006de481367261f6e5a..406490dbeea8ac7bb31e8d13b5a362b4188ae332 100644 (file)
@@ -139,7 +139,7 @@ ostree_deployment_set_origin (OstreeDeployment *self, GKeyFile *origin)
 OstreeDeployment *
 ostree_deployment_clone (OstreeDeployment *self)
 {
-  gs_unref_object OstreeBootconfigParser *new_bootconfig = NULL;
+  glnx_unref_object OstreeBootconfigParser *new_bootconfig = NULL;
   GKeyFile *new_origin = NULL;
   OstreeDeployment *ret = ostree_deployment_new (self->index, self->osname, self->csum,
                                                  self->deployserial,
index c3072aaeb11bd2a9161acca95054588368359b02..c50a096400750578cf29e05d213c204be71fb991 100644 (file)
@@ -446,7 +446,7 @@ on_request_sent (GObject        *object,
 {
   OstreeFetcherPendingURI *pending = user_data;
   GError *local_error = NULL;
-  gs_unref_object SoupMessage *msg = NULL;
+  glnx_unref_object SoupMessage *msg = NULL;
 
   pending->state = OSTREE_FETCHER_STATE_COMPLETE;
   pending->request_body = soup_request_send_finish ((SoupRequest*) object,
index 20cd2b26681a24d5191bc09f6d8485b6cb1393c9..cae5914d200349e67c6d1ecafc355f6195f728e8 100644 (file)
@@ -184,7 +184,7 @@ ostree_mutable_tree_ensure_dir (OstreeMutableTree *self,
                                 GError           **error)
 {
   gboolean ret = FALSE;
-  gs_unref_object OstreeMutableTree *ret_dir = NULL;
+  glnx_unref_object OstreeMutableTree *ret_dir = NULL;
 
   g_return_val_if_fail (name != NULL, FALSE);
 
@@ -217,7 +217,7 @@ ostree_mutable_tree_lookup (OstreeMutableTree   *self,
                             GError             **error)
 {
   gboolean ret = FALSE;
-  gs_unref_object OstreeMutableTree *ret_subdir = NULL;
+  glnx_unref_object OstreeMutableTree *ret_subdir = NULL;
   g_autofree char *ret_file_checksum = NULL;
   
   ret_subdir = ot_gobject_refz (g_hash_table_lookup (self->subdirs, name));
@@ -259,7 +259,7 @@ ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree  *self,
   gboolean ret = FALSE;
   int i;
   OstreeMutableTree *subdir = self; /* nofree */
-  gs_unref_object OstreeMutableTree *ret_parent = NULL;
+  glnx_unref_object OstreeMutableTree *ret_parent = NULL;
 
   g_assert (metadata_checksum != NULL);
 
index 8d61b0ecff2aed4226d96ee5d7987359e3e98480..d26f00e8db49fca76a464ce642aedb61840779ba 100644 (file)
@@ -539,7 +539,7 @@ write_object (OstreeRepo         *self,
   g_autofree char *temp_filename = NULL;
   g_autoptr(GFile) stored_path = NULL;
   g_autofree guchar *ret_csum = NULL;
-  gs_unref_object OstreeChecksumInputStream *checksum_input = NULL;
+  glnx_unref_object OstreeChecksumInputStream *checksum_input = NULL;
   g_autoptr(GInputStream) file_input = NULL;
   g_autoptr(GFileInfo) file_info = NULL;
   gs_unref_variant GVariant *xattrs = NULL;
@@ -2278,7 +2278,7 @@ write_directory_content_to_mtree_internal (OstreeRepo                  *self,
   gboolean ret = FALSE;
   g_autoptr(GFile) child = NULL;
   g_autoptr(GFileInfo) modified_info = NULL;
-  gs_unref_object OstreeMutableTree *child_mtree = NULL;
+  glnx_unref_object OstreeMutableTree *child_mtree = NULL;
   g_autofree char *child_relpath = NULL;
   const char *name;
   GFileType file_type;
index 389f0f4c68ee2884b030e90013cf0541f0e8a83d..e55e6f4afd1f747d8a4c0bd8401feb2508dda27b 100644 (file)
@@ -125,11 +125,11 @@ write_libarchive_entry_to_mtree (OstreeRepo           *self,
   g_autoptr(GFileInfo) file_info = NULL;
   gs_unref_ptrarray GPtrArray *split_path = NULL;
   gs_unref_ptrarray GPtrArray *hardlink_split_path = NULL;
-  gs_unref_object OstreeMutableTree *subdir = NULL;
-  gs_unref_object OstreeMutableTree *parent = NULL;
-  gs_unref_object OstreeMutableTree *hardlink_source_parent = NULL;
+  glnx_unref_object OstreeMutableTree *subdir = NULL;
+  glnx_unref_object OstreeMutableTree *parent = NULL;
+  glnx_unref_object OstreeMutableTree *hardlink_source_parent = NULL;
   g_autofree char *hardlink_source_checksum = NULL;
-  gs_unref_object OstreeMutableTree *hardlink_source_subdir = NULL;
+  glnx_unref_object OstreeMutableTree *hardlink_source_subdir = NULL;
   g_autofree guchar *tmp_csum = NULL;
   g_autofree char *tmp_checksum = NULL;
 
index 599ee492de4aaf36c085e8584e2113d888e00f5e..0758970be922892f442cf7924201aa55326ad948 100644 (file)
@@ -964,7 +964,7 @@ scan_commit_object (OtPullData         *pull_data,
 
   if (pull_data->gpg_verify)
     {
-      gs_unref_object OstreeGpgVerifyResult *result = NULL;
+      glnx_unref_object OstreeGpgVerifyResult *result = NULL;
 
       result = ostree_repo_verify_commit_ext (pull_data->repo,
                                               checksum,
@@ -1640,7 +1640,7 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
   gs_unref_hashtable GHashTable *requested_refs_to_fetch = NULL;
   gs_unref_hashtable GHashTable *commits_to_fetch = NULL;
   g_autofree char *remote_mode_str = NULL;
-  gs_unref_object OstreeMetalink *metalink = NULL;
+  glnx_unref_object OstreeMetalink *metalink = NULL;
   OtPullData pull_data_real = { 0, };
   OtPullData *pull_data = &pull_data_real;
   GKeyFile *remote_config = NULL;
index 1bf744ae4ed88aa06fc409520daed3554bb4ea0c..a03e894cbd3268c1f059300d3f295bf7dca343ab 100644 (file)
@@ -3253,7 +3253,7 @@ ostree_repo_sign_commit (OstreeRepo     *self,
   gs_unref_variant GVariant *commit_variant = NULL;
   gs_unref_variant GVariant *old_metadata = NULL;
   gs_unref_variant GVariant *new_metadata = NULL;
-  gs_unref_object OstreeGpgVerifyResult *result = NULL;
+  glnx_unref_object OstreeGpgVerifyResult *result = NULL;
   GError *local_error = NULL;
 
   if (!ostree_repo_load_variant (self, OSTREE_OBJECT_TYPE_COMMIT,
@@ -3409,7 +3409,7 @@ _ostree_repo_gpg_verify_with_metadata (OstreeRepo          *self,
                                        GError             **error)
 {
   OstreeGpgVerifyResult *result = NULL;
-  gs_unref_object OstreeGpgVerifier *verifier = NULL;
+  glnx_unref_object OstreeGpgVerifier *verifier = NULL;
   gs_unref_variant GVariant *signaturedata = NULL;
   GByteArray *buffer;
   GVariantIter iter;
@@ -3489,7 +3489,7 @@ ostree_repo_verify_commit (OstreeRepo   *self,
                            GCancellable *cancellable,
                            GError      **error)
 {
-  gs_unref_object OstreeGpgVerifyResult *result = NULL;
+  glnx_unref_object OstreeGpgVerifyResult *result = NULL;
   gboolean ret = FALSE;
 
   result = ostree_repo_verify_commit_ext (self, commit_checksum,
index 46ad0e93955dea3d22dfd685d0ccf5b552ae2b33..7910a1a187db81cb7b74b130e69998a57253ef38 100644 (file)
@@ -62,7 +62,7 @@ _ostree_sysroot_list_deployment_dirs_for_os (GFile               *osdir,
       const char *name;
       GFileInfo *file_info = NULL;
       GFile *child = NULL;
-      gs_unref_object OstreeDeployment *deployment = NULL;
+      glnx_unref_object OstreeDeployment *deployment = NULL;
       g_autofree char *csum = NULL;
       gint deployserial;
 
@@ -503,7 +503,7 @@ ostree_sysroot_cleanup (OstreeSysroot       *self,
                         GError             **error)
 {
   gboolean ret = FALSE;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
 
   g_return_val_if_fail (self->loaded, FALSE);
 
index 7a8af1669d61562b387eb5779c07925cc0aa0b10..5e1ec44559981ccb3e6fdf6ed292b857bb9ee992 100644 (file)
@@ -740,7 +740,7 @@ merge_configuration (OstreeSysroot         *sysroot,
   g_autoptr(GFile) source_etc_pristine_path = NULL;
   g_autoptr(GFile) deployment_usretc_path = NULL;
   g_autoptr(GFile) deployment_etc_path = NULL;
-  gs_unref_object OstreeSePolicy *sepolicy = NULL;
+  glnx_unref_object OstreeSePolicy *sepolicy = NULL;
   gboolean etc_exists;
   gboolean usretc_exists;
 
@@ -1582,9 +1582,9 @@ ostree_sysroot_write_deployments (OstreeSysroot     *self,
   else
     {
       int new_bootversion = self->bootversion ? 0 : 1;
-      gs_unref_object OstreeBootloader *bootloader = NULL;
+      glnx_unref_object OstreeBootloader *bootloader = NULL;
       g_autoptr(GFile) new_loader_entries_dir = NULL;
-      gs_unref_object OstreeRepo *repo = NULL;
+      glnx_unref_object OstreeRepo *repo = NULL;
       gboolean show_osname = FALSE;
 
       if (!_ostree_sysroot_query_bootloader (self, &bootloader, cancellable, error))
@@ -1765,18 +1765,18 @@ ostree_sysroot_deploy_tree (OstreeSysroot     *self,
 {
   gboolean ret = FALSE;
   gint new_deployserial;
-  gs_unref_object OstreeDeployment *new_deployment = NULL;
-  gs_unref_object OstreeDeployment *merge_deployment = NULL;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeDeployment *new_deployment = NULL;
+  glnx_unref_object OstreeDeployment *merge_deployment = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   g_autoptr(GFile) osdeploydir = NULL;
   g_autoptr(GFile) deployment_var = NULL;
   g_autoptr(GFile) commit_root = NULL;
   g_autoptr(GFile) tree_kernel_path = NULL;
   g_autoptr(GFile) tree_initramfs_path = NULL;
   glnx_fd_close int deployment_dfd = -1;
-  gs_unref_object OstreeSePolicy *sepolicy = NULL;
+  glnx_unref_object OstreeSePolicy *sepolicy = NULL;
   g_autofree char *new_bootcsum = NULL;
-  gs_unref_object OstreeBootconfigParser *bootconfig = NULL;
+  glnx_unref_object OstreeBootconfigParser *bootconfig = NULL;
 
   g_return_val_if_fail (osname != NULL || self->booted_deployment != NULL, FALSE);
 
@@ -1923,7 +1923,7 @@ ostree_sysroot_deployment_set_kargs (OstreeSysroot     *self,
   gboolean ret = FALSE;
   guint i;
   gs_unref_ptrarray GPtrArray *new_deployments = g_ptr_array_new_with_free_func (g_object_unref);
-  gs_unref_object OstreeDeployment *new_deployment = NULL;
+  glnx_unref_object OstreeDeployment *new_deployment = NULL;
   __attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
   g_autofree char *new_options = NULL;
   OstreeBootconfigParser *new_bootconfig;
index 9bcd7119ea67ee10cdc227a2630075a9420151fc..eed779c40c6af85910c3202d38175f53506f200b 100644 (file)
@@ -493,7 +493,7 @@ ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader  *self,
                                       GError                **error)
 {
   gboolean ret = FALSE;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   char *refs_to_fetch[] = { self->origin_ref, NULL };
   const char *from_revision = NULL;
   g_autofree char *new_revision = NULL;
@@ -564,7 +564,7 @@ ostree_sysroot_upgrader_deploy (OstreeSysrootUpgrader  *self,
                                 GError                **error)
 {
   gboolean ret = FALSE;
-  gs_unref_object OstreeDeployment *new_deployment = NULL;
+  glnx_unref_object OstreeDeployment *new_deployment = NULL;
 
   if (!ostree_sysroot_deploy_tree (self->sysroot, self->osname,
                                    self->new_revision,
index e6bc632dceea65c49e83a51ea1468bf16f027526..20573f8df3239854207d6faf2404f762c706fd85 100644 (file)
@@ -256,7 +256,7 @@ ostree_sysroot_ensure_initialized (OstreeSysroot  *self,
   dir = ot_gfile_get_child_build_path (ostree_dir, "repo", "objects", NULL);
   if (!g_file_query_exists (dir, NULL))
     {
-      gs_unref_object OstreeRepo *repo = ostree_repo_new (repo_dir);
+      glnx_unref_object OstreeRepo *repo = ostree_repo_new (repo_dir);
       if (!ostree_repo_create (repo, OSTREE_REPO_MODE_BARE,
                                cancellable, error))
         goto out;
@@ -416,7 +416,7 @@ _ostree_sysroot_read_boot_loader_configs (OstreeSysroot *self,
           g_str_has_suffix (dent->d_name, ".conf") &&
           S_ISREG (stbuf.st_mode))
         {
-          gs_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
+          glnx_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
   
           if (!ostree_bootconfig_parser_parse_at (config, dfd_iter.fd, dent->d_name, cancellable, error))
             {
@@ -584,7 +584,7 @@ parse_deployment (OstreeSysroot       *self,
 {
   gboolean ret = FALSE;
   const char *relative_boot_link;
-  gs_unref_object OstreeDeployment *ret_deployment = NULL;
+  glnx_unref_object OstreeDeployment *ret_deployment = NULL;
   int entry_boot_version;
   int treebootserial = -1;
   int deployserial = -1;
@@ -676,7 +676,7 @@ list_deployments_process_one_boot_entry (OstreeSysroot               *self,
 {
   gboolean ret = FALSE;
   g_autofree char *ostree_arg = NULL;
-  gs_unref_object OstreeDeployment *deployment = NULL;
+  glnx_unref_object OstreeDeployment *deployment = NULL;
 
   ostree_arg = get_ostree_kernel_arg_from_config (config);
   if (ostree_arg == NULL)
@@ -935,7 +935,7 @@ _ostree_sysroot_query_bootloader (OstreeSysroot     *sysroot,
 {
   gboolean ret = FALSE;
   gboolean is_active;
-  gs_unref_object OstreeBootloader *ret_loader = NULL;
+  glnx_unref_object OstreeBootloader *ret_loader = NULL;
 
   ret_loader = (OstreeBootloader*)_ostree_bootloader_syslinux_new (sysroot);
   if (!_ostree_bootloader_query (ret_loader, &is_active,
@@ -1021,7 +1021,7 @@ find_booted_deployment (OstreeSysroot       *self,
   gboolean ret = FALSE;
   struct stat root_stbuf;
   struct stat self_stbuf;
-  gs_unref_object OstreeDeployment *ret_deployment = NULL;
+  glnx_unref_object OstreeDeployment *ret_deployment = NULL;
 
   if (stat ("/", &root_stbuf) != 0)
     {
index 98baf8611c4ad693b9515e0d8b3388158a861469..49478614c79e8e435a00d7ba6b298d0c0cb1d85d 100644 (file)
@@ -38,7 +38,7 @@ gboolean
 ot_admin_builtin_cleanup (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   gboolean ret = FALSE;
 
   context = g_option_context_new ("Delete untagged deployments and repository objects");
index b2b24f039d56b338082553574310ab9aacebead8..6fc0deb296ba44172f9439e8aab07a80802244e5 100644 (file)
@@ -55,12 +55,12 @@ ot_admin_builtin_deploy (int argc, char **argv, GCancellable *cancellable, GErro
   gboolean ret = FALSE;
   const char *refspec;
   GOptionContext *context;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   GKeyFile *origin = NULL;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gs_unref_ptrarray GPtrArray *new_deployments = NULL;
-  gs_unref_object OstreeDeployment *new_deployment = NULL;
-  gs_unref_object OstreeDeployment *merge_deployment = NULL;
+  glnx_unref_object OstreeDeployment *new_deployment = NULL;
+  glnx_unref_object OstreeDeployment *merge_deployment = NULL;
   g_autofree char *revision = NULL;
   __attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
 
index 60bfcd3d295df9d0ef36d74e2c87c018e0766029..cb45c8062031c4e39a5b904f6bbd86e152ff571c 100644 (file)
@@ -41,9 +41,9 @@ gboolean
 ot_admin_builtin_diff (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   gboolean ret = FALSE;
-  gs_unref_object OstreeDeployment *deployment = NULL;
+  glnx_unref_object OstreeDeployment *deployment = NULL;
   g_autoptr(GFile) deployment_dir = NULL;
   gs_unref_ptrarray GPtrArray *modified = NULL;
   gs_unref_ptrarray GPtrArray *removed = NULL;
index 943a68f6bbc3969acf658dce86b55e429b34adc9..33856419c832c3716e15c585fa744d592c03f9f2 100644 (file)
@@ -38,11 +38,11 @@ gboolean
 ot_admin_builtin_init_fs (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   gboolean ret = FALSE;
   g_autoptr(GFile) dir = NULL;
   g_autoptr(GFile) child = NULL;
-  gs_unref_object OstreeSysroot *target_sysroot = NULL;
+  glnx_unref_object OstreeSysroot *target_sysroot = NULL;
   guint i;
   const char *normal_toplevels[] = {"boot", "dev", "home", "proc", "run", "sys"};
 
index ee5c9dc7c4d64b91490d3cff7bff651ff5de363a..1c575173353e79828c3eabf9cee5334043c38ef1 100644 (file)
@@ -38,7 +38,7 @@ gboolean
 ot_admin_builtin_os_init (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   gboolean ret = FALSE;
   const char *osname = NULL;
   g_autoptr(GFile) deploy_dir = NULL;
index a3f071c7cc9387a24c306880b6999ba4a22e583f..24a919fdc9687f5f42e73170e7410c5af0c44f3d 100644 (file)
@@ -49,8 +49,8 @@ ot_admin_builtin_set_origin (int argc, char **argv, GCancellable *cancellable, G
   const char *remotename = NULL;
   const char *url = NULL;
   const char *branch = NULL;
-  gs_unref_object OstreeRepo *repo = NULL;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   OstreeDeployment *target_deployment = NULL;
 
   context = g_option_context_new ("REMOTENAME URL [BRANCH]");
index 242a915d81ddd540d65af4a3c5e28b6ee0f42cc5..9dac4da971dfaebde97ea7d26cbeb886ff878dcb 100644 (file)
@@ -85,9 +85,9 @@ gboolean
 ot_admin_builtin_status (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   gboolean ret = FALSE;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   OstreeDeployment *booted_deployment = NULL;
   gs_unref_ptrarray GPtrArray *deployments = NULL;
   guint i;
@@ -120,7 +120,7 @@ ot_admin_builtin_status (int argc, char **argv, GCancellable *cancellable, GErro
           GKeyFile *origin;
           const char *ref = ostree_deployment_get_csum (deployment);
           g_autofree char *version = version_of_commit (repo, ref);
-          gs_unref_object OstreeGpgVerifyResult *result = NULL;
+          glnx_unref_object OstreeGpgVerifyResult *result = NULL;
           GString *output_buffer;
           guint jj, n_signatures;
           GError *local_error = NULL;
index db3d0c3bc52b692ef1c0d2bd00d4157e7a854df8..61793e50943272fcb50a2940413203e6737d4232 100644 (file)
@@ -44,9 +44,9 @@ ot_admin_builtin_switch (int argc, char **argv, GCancellable *cancellable, GErro
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   const char *new_provided_refspec = NULL;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   g_autofree char *origin_refspec = NULL;
   g_autofree char *origin_remote = NULL;
   g_autofree char *origin_ref = NULL;
@@ -56,10 +56,10 @@ ot_admin_builtin_switch (int argc, char **argv, GCancellable *cancellable, GErro
   g_autofree char *new_revision = NULL;
   g_autoptr(GFile) deployment_path = NULL;
   g_autoptr(GFile) deployment_origin_path = NULL;
-  gs_unref_object OstreeDeployment *merge_deployment = NULL;
-  gs_unref_object OstreeDeployment *new_deployment = NULL;
-  gs_unref_object OstreeSysrootUpgrader *upgrader = NULL;
-  gs_unref_object OstreeAsyncProgress *progress = NULL;
+  glnx_unref_object OstreeDeployment *merge_deployment = NULL;
+  glnx_unref_object OstreeDeployment *new_deployment = NULL;
+  glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
+  glnx_unref_object OstreeAsyncProgress *progress = NULL;
   gboolean changed;
   GSConsole *console = NULL;
   gboolean in_status_line = FALSE;
index 3390ee9c1485c318073999198c92dfb61067032a..39ae073304a9e054e211a48086dfe0b09b7ef7d3 100644 (file)
@@ -37,12 +37,12 @@ ot_admin_builtin_undeploy (int argc, char **argv, GCancellable *cancellable, GEr
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   const char *deploy_index_str;
   int deploy_index;
   gs_unref_ptrarray GPtrArray *current_deployments = NULL;
-  gs_unref_object OstreeDeployment *booted_deployment = NULL;
-  gs_unref_object OstreeDeployment *target_deployment = NULL;
+  glnx_unref_object OstreeDeployment *booted_deployment = NULL;
+  glnx_unref_object OstreeDeployment *target_deployment = NULL;
 
   context = g_option_context_new ("INDEX - Delete deployment INDEX");
 
index 875f6fe8bbf4a1b4b9fa88e34ebcca509a8b70ad..abf37596aab81a8cd8f5a78b036154badc4128bb 100644 (file)
@@ -49,19 +49,19 @@ ot_admin_builtin_upgrade (int argc, char **argv, GCancellable *cancellable, GErr
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
-  gs_unref_object OstreeSysrootUpgrader *upgrader = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
   g_autofree char *origin_remote = NULL;
   g_autofree char *origin_ref = NULL;
   g_autofree char *origin_refspec = NULL;
   g_autofree char *new_revision = NULL;
   g_autoptr(GFile) deployment_path = NULL;
   g_autoptr(GFile) deployment_origin_path = NULL;
-  gs_unref_object OstreeDeployment *merge_deployment = NULL;
-  gs_unref_object OstreeDeployment *new_deployment = NULL;
+  glnx_unref_object OstreeDeployment *merge_deployment = NULL;
+  glnx_unref_object OstreeDeployment *new_deployment = NULL;
   GSConsole *console = NULL;
   gboolean in_status_line = FALSE;
-  gs_unref_object OstreeAsyncProgress *progress = NULL;
+  glnx_unref_object OstreeAsyncProgress *progress = NULL;
   gboolean changed;
   OstreeSysrootUpgraderPullFlags upgraderpullflags = 0;
 
index 7fd05b64d3913706c0664a81c8ee2b29a1fbfa8f..832ac069a769f1c992f3d1dd979c342844861885 100644 (file)
@@ -39,10 +39,10 @@ ot_admin_instutil_builtin_grub2_generate (int argc, char **argv, GCancellable *c
   gboolean ret = FALSE;
   guint bootversion;
   g_autoptr(GFile) subpath = NULL;
-  gs_unref_object OstreeSePolicy *sepolicy = NULL;
+  glnx_unref_object OstreeSePolicy *sepolicy = NULL;
   gs_unref_ptrarray GPtrArray *deployments = NULL;
   GOptionContext *context = NULL;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   g_autoptr(GFile) deployment_path = NULL;
 
   context = g_option_context_new ("[BOOTVERSION] - generate GRUB2 configuration from given BLS entries");
index d1e80e9b4570c07b312064f41056a806aa97c304..471410cd850ed1aa7ea8a19b6dc264377bf93091 100644 (file)
@@ -185,11 +185,11 @@ ot_admin_instutil_builtin_selinux_ensure_labeled (int argc, char **argv, GCancel
   const char *policy_name;
   g_autoptr(GFile) subpath = NULL;
   const char *prefix = NULL;
-  gs_unref_object OstreeSePolicy *sepolicy = NULL;
+  glnx_unref_object OstreeSePolicy *sepolicy = NULL;
   gs_unref_ptrarray GPtrArray *deployments = NULL;
   OstreeDeployment *first_deployment;
   GOptionContext *context = NULL;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   g_autoptr(GFile) deployment_path = NULL;
 
   context = g_option_context_new ("[SUBPATH PREFIX] - relabel all or part of a deployment");
index 9150a26fca6766f1e6fcf7055d351910a5ec966b..a985979f5816590c087cff4525eb443b2a920c40 100644 (file)
@@ -51,7 +51,7 @@ ot_admin_instutil_builtin_set_kargs (int argc, char **argv, GCancellable *cancel
   gs_unref_ptrarray GPtrArray *deployments = NULL;
   OstreeDeployment *first_deployment = NULL;
   GOptionContext *context = NULL;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   __attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
 
   context = g_option_context_new ("ARGS - set new kernel command line arguments");
index f63ec5deeecce8d90d0b8a7884db6b9144c47361..e258f3f7eef74a54a2cb2aa097c7a0f45e651e7f 100644 (file)
@@ -62,7 +62,7 @@ gboolean
 ostree_builtin_cat (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   int i;
   const char *rev;
index a1ce316c5ea36d9724e20191f0185265f0557bfd..9929a37bae6a79d2670d74cd686403b138a1569f 100644 (file)
@@ -225,7 +225,7 @@ gboolean
 ostree_builtin_checkout (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   const char *commit;
   const char *destination;
index 73885bc7953add40f073f069bb33fa9675cf938b..f75def1f30aa85a6640a79662276494e56adce9d 100644 (file)
@@ -292,7 +292,7 @@ gboolean
 ostree_builtin_commit (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   gboolean skip_commit = FALSE;
   g_autoptr(GFile) arg = NULL;
@@ -301,7 +301,7 @@ ostree_builtin_commit (int argc, char **argv, GCancellable *cancellable, GError
   g_autoptr(GFile) root = NULL;
   gs_unref_variant GVariant *metadata = NULL;
   gs_unref_variant GVariant *detached_metadata = NULL;
-  gs_unref_object OstreeMutableTree *mtree = NULL;
+  glnx_unref_object OstreeMutableTree *mtree = NULL;
   g_autofree char *tree_type = NULL;
   gs_unref_hashtable GHashTable *mode_adds = NULL;
   OstreeRepoCommitModifierFlags flags = 0;
index 7590dc1e31ec63d7a66f74f20107e5474d782bed..75ccbeb07b3f0fc1211d9d209b70fea367e5d881 100644 (file)
@@ -56,7 +56,7 @@ gboolean
 ostree_builtin_config (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context = NULL;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   const char *op;
   const char *section_key;
index 11036e8fe0e25fbf79e667c2540e39fc7c19dae0..385d91034dbb11be0dedd5c57d0a1d2993f9cdf1 100644 (file)
@@ -120,7 +120,7 @@ ostree_builtin_diff (int argc, char **argv, GCancellable *cancellable, GError **
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   const char *src;
   const char *target;
   g_autofree char *src_prev = NULL;
index 6ffe0e28c63e0e57d3b30d59bdd22b758dc63f6f..e13c1a8e02304932ed5b3f36136542e77a4e29ed 100644 (file)
@@ -239,7 +239,7 @@ ostree_builtin_fsck (int argc, char **argv, GCancellable *cancellable, GError **
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   GHashTableIter hash_iter;
   gpointer key, value;
   gboolean found_corruption = FALSE;
index 93c78a4ac93720dbb048a4995af5ee4e5bb9e6da..d1f016d854f90e71201b47cb1b852f498b1391b6 100644 (file)
@@ -54,7 +54,7 @@ delete_signatures (OstreeRepo *repo,
                    GError **error)
 {
   GVariantDict metadata_dict;
-  gs_unref_object OstreeGpgVerifyResult *result = NULL;
+  glnx_unref_object OstreeGpgVerifyResult *result = NULL;
   gs_unref_variant GVariant *old_metadata = NULL;
   gs_unref_variant GVariant *new_metadata = NULL;
   gs_unref_variant GVariant *signature_data = NULL;
@@ -198,7 +198,7 @@ gboolean
 ostree_builtin_gpg_sign (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   g_autofree char *resolved_commit = NULL;
   const char *commit;
   char **key_ids;
index 9aceda50dc067bada52d1f54f8603485ab50c229..05d64acac684e81a485674843927999531a3e2cb 100644 (file)
@@ -38,7 +38,7 @@ gboolean
 ostree_builtin_init (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context = NULL;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   OstreeRepoMode mode;
 
index edc494ec176723aa3d3202ef726fa04e295cb06b..e00ddd6b4c886f942632a1b14ca28ce88c4de41d 100644 (file)
@@ -82,7 +82,7 @@ ostree_builtin_log (int           argc,
                     GError      **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   const char *rev;
   g_autofree char *checksum = NULL;
index 811abc248f34651c663a437f430c19c0bd0875dc..ab63c8bb60210b5e3b791ab74f9b81e7557ba8b5 100644 (file)
@@ -243,7 +243,7 @@ gboolean
 ostree_builtin_ls (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   const char *rev;
   int i;
index 5bef20990e5f2e7bee7e582c91d43e7295f1a9ea..5b6cb3b5324baee3592b205b38deb435be706e6d 100644 (file)
@@ -43,7 +43,7 @@ ostree_builtin_prune (int argc, char **argv, GCancellable *cancellable, GError *
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   g_autofree char *formatted_freed_size = NULL;
   OstreeRepoPruneFlags pruneflags = 0;
   gint n_objects_total;
index 40179f250b0aaec99bb317b2a376d52776f7be28..993c53ecf7a18b4a111e6b21c2ea3c6b12315f92 100644 (file)
@@ -44,12 +44,12 @@ ostree_builtin_pull_local (int argc, char **argv, GCancellable *cancellable, GEr
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   int i;
   const char *src_repo_arg;
   GSConsole *console = NULL;
   g_autofree char *src_repo_uri = NULL;
-  gs_unref_object OstreeAsyncProgress *progress = NULL;
+  glnx_unref_object OstreeAsyncProgress *progress = NULL;
   gs_unref_ptrarray GPtrArray *refs_to_fetch = NULL;
   gs_unref_hashtable GHashTable *source_objects = NULL;
 
@@ -87,7 +87,7 @@ ostree_builtin_pull_local (int argc, char **argv, GCancellable *cancellable, GEr
   if (argc == 2)
     {
       g_autoptr(GFile) src_repo_path = g_file_new_for_path (src_repo_arg);
-      gs_unref_object OstreeRepo *src_repo = ostree_repo_new (src_repo_path);
+      glnx_unref_object OstreeRepo *src_repo = ostree_repo_new (src_repo_path);
       gs_unref_hashtable GHashTable *refs_to_clone = NULL;
 
       refs_to_fetch = g_ptr_array_new_with_free_func (g_free);
index cb407a86a51f2976d421b69901558af2c7704582..e19ef3c14e73349578a54c65e83036dbd1c0e334 100644 (file)
@@ -58,13 +58,13 @@ gboolean
 ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   g_autofree char *remote = NULL;
   OstreeRepoPullFlags pullflags = 0;
   GSConsole *console = NULL;
   gs_unref_ptrarray GPtrArray *refs_to_fetch = NULL;
-  gs_unref_object OstreeAsyncProgress *progress = NULL;
+  glnx_unref_object OstreeAsyncProgress *progress = NULL;
   gulong signal_handler_id = 0;
 
   context = g_option_context_new ("REMOTE [BRANCH...] - Download data from remote repository");
index 2b579276254a2245bfda3837fefbd903e199ec3a..958799009bb385ce787f60bb4d9f5e6ab841ff8a 100644 (file)
@@ -39,7 +39,7 @@ ostree_builtin_refs (int argc, char **argv, GCancellable *cancellable, GError **
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   const char *refspec_prefix = NULL;
   gs_unref_hashtable GHashTable *refs = NULL;
   GHashTableIter hashiter;
index 6300d1626638aaccbb55f16e4d4cb1316b163606..eed44c077a61fa044cb34743576512ae0fdc5a28 100644 (file)
@@ -56,7 +56,7 @@ ostree_builtin_reset (int           argc,
                       GError      **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   const char *ref;
   const char *target = NULL;
index 9bd3aaa881689edc7f1e4e8be78a12d00110fc5b..fb68d4ac6cecabbf05df7dc128444d8a662bd55b 100644 (file)
@@ -35,7 +35,7 @@ gboolean
 ostree_builtin_rev_parse (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   const char *rev = "master";
   int i;
index c25e30b4756f68e643855ff2ca469ef036318132..421d770e575db8796611d0fbb4c1ee355842323b 100644 (file)
@@ -169,7 +169,7 @@ print_object (OstreeRepo          *repo,
 
   if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
     {
-      gs_unref_object OstreeGpgVerifyResult *result = NULL;
+      glnx_unref_object OstreeGpgVerifyResult *result = NULL;
       GError *local_error = NULL;
       g_autoptr(GFile) gpg_homedir = opt_gpg_homedir ? g_file_new_for_path (opt_gpg_homedir) : NULL;
 
@@ -246,7 +246,7 @@ gboolean
 ostree_builtin_show (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   gboolean ret = FALSE;
   const char *rev;
   g_autofree char *resolved_rev = NULL;
index fba3d303284cdc8b2d4a6ec86216d1b12e77c70b..ad884e91e1695bf2fb2a0d2d26377133edee514e 100644 (file)
@@ -100,7 +100,7 @@ ot_static_delta_builtin_list (int argc, char **argv, GCancellable *cancellable,
   gs_unref_ptrarray GPtrArray *delta_names = NULL;
   guint i;
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
 
   context = g_option_context_new ("LIST - list static delta files");
 
@@ -134,7 +134,7 @@ ot_static_delta_builtin_generate (int argc, char **argv, GCancellable *cancellab
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
 
   context = g_option_context_new ("Generate static delta files");
   if (!ostree_option_context_parse (context, generate_options, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error))
@@ -245,7 +245,7 @@ ot_static_delta_builtin_apply_offline (int argc, char **argv, GCancellable *canc
   const char *patharg;
   g_autoptr(GFile) path = NULL;
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
 
   context = g_option_context_new ("DELTA - Apply static delta file");
   if (!ostree_option_context_parse (context, apply_offline_options, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error))
@@ -286,7 +286,7 @@ ostree_builtin_static_delta (int argc, char **argv, GCancellable *cancellable, G
   gboolean ret = FALSE;
   OstreeCommand *command = NULL;
   const char *cmdname = NULL;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
   int i;
   gboolean want_help = FALSE;
 
index 81566898bbb7013f9b4fc99d5fdcfe1d32979469..ed167b7c6c9967f3393c1078bc26562bce0c4c40 100644 (file)
@@ -37,7 +37,7 @@ ostree_builtin_summary (int argc, char **argv, GCancellable *cancellable, GError
 {
   gboolean ret = FALSE;
   GOptionContext *context;
-  gs_unref_object OstreeRepo *repo = NULL;
+  glnx_unref_object OstreeRepo *repo = NULL;
 
   context = g_option_context_new ("Manage summary metadata");
 
index cde4abbe568f7cc0c157967c82ff00a611d190bc..7d437fb02faab5ff6be8c70e23e7abebe4af5ebe 100644 (file)
@@ -332,7 +332,7 @@ ostree_builtin_trivial_httpd (int argc, char **argv, GCancellable *cancellable,
   const char *dirpath;
   OtTrivialHttpd appstruct = { 0, };
   OtTrivialHttpd *app = &appstruct;
-  gs_unref_object SoupServer *server = NULL;
+  glnx_unref_object SoupServer *server = NULL;
   g_autoptr(GFileMonitor) dirmon = NULL;
 
   context = g_option_context_new ("[DIR] - Simple webserver");
index b81312fa0b515adf62002f21b95b9530c14e06b5..2b2101f6af4bf4f7dc5b6425061b2d5aa4f907f1 100644 (file)
@@ -62,8 +62,8 @@ ot_editor_prompt (OstreeRepo *repo,
                   GCancellable *cancellable,
                   GError **error)
 {
-  gs_unref_object GSSubprocessContext *ctx = NULL;
-  gs_unref_object GSSubprocess *proc = NULL;
+  glnx_unref_object GSSubprocessContext *ctx = NULL;
+  glnx_unref_object GSSubprocess *proc = NULL;
   g_autoptr(GFile) file = NULL;
   g_autoptr(GFileIOStream) io = NULL;
   GOutputStream *output;
index 14e9aa04a0dafdf0501a7de6a9e7e1f69d3a0494..f0fcacea948375a988542289f71f0b4bd0b85413 100644 (file)
@@ -312,7 +312,7 @@ ostree_admin_option_context_parse (GOptionContext *context,
                                    GError **error)
 {
   g_autoptr(GFile) sysroot_path = NULL;
-  gs_unref_object OstreeSysroot *sysroot = NULL;
+  glnx_unref_object OstreeSysroot *sysroot = NULL;
   gboolean success = FALSE;
 
   /* Entries are listed in --help output in the order added.  We add the
index d351f40ff3f6543240f29dc63eaad4071e52eac9..64d8d3072dc7c1f3b2feed51766ca724a79e106f 100644 (file)
@@ -32,7 +32,7 @@ static void
 test_metadata_checksum (void)
 {
   const char *checksum = "12345678901234567890123456789012";
-  gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+  glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
 
   g_assert_null (ostree_mutable_tree_get_metadata_checksum (tree));
 
@@ -44,8 +44,8 @@ test_metadata_checksum (void)
 static void
 test_mutable_tree_walk (void)
 {
-  gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
-  gs_unref_object OstreeMutableTree *parent = NULL;
+  glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+  glnx_unref_object OstreeMutableTree *parent = NULL;
   gs_unref_ptrarray GPtrArray *split_path = NULL;
   GError *error = NULL;
   const char *pathname = "a/b/c/d/e/f/g/i";
@@ -57,21 +57,21 @@ test_mutable_tree_walk (void)
                                                     checksum, &parent,
                                                     &error));
   {
-    gs_unref_object OstreeMutableTree *subdir = NULL;
+    glnx_unref_object OstreeMutableTree *subdir = NULL;
     g_assert (ostree_mutable_tree_walk (tree, split_path, 0, &subdir, &error));
     g_assert_nonnull (subdir);
   }
 
   {
-    gs_unref_object OstreeMutableTree *subdir = NULL;
+    glnx_unref_object OstreeMutableTree *subdir = NULL;
     g_assert_false (ostree_mutable_tree_walk (tree, split_path, 1, &subdir, &error));
     g_assert_null (subdir);
     g_clear_error (&error);
   }
 
   {
-    gs_unref_object OstreeMutableTree *subdir = NULL;
-    gs_unref_object OstreeMutableTree *a = NULL;
+    glnx_unref_object OstreeMutableTree *subdir = NULL;
+    glnx_unref_object OstreeMutableTree *a = NULL;
     g_autofree char *source_checksum = NULL;
     ostree_mutable_tree_lookup (tree, "a", &source_checksum, &a, &error);
     g_assert (ostree_mutable_tree_walk (a, split_path, 1, &subdir, &error));
@@ -82,16 +82,16 @@ test_mutable_tree_walk (void)
 static void
 test_ensure_parent_dirs (void)
 {
-  gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
-  gs_unref_object OstreeMutableTree *parent = NULL;
+  glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+  glnx_unref_object OstreeMutableTree *parent = NULL;
   gs_unref_ptrarray GPtrArray *split_path = NULL;
   GError *error = NULL;
   const char *pathname = "/foo/bar/baz";
   const char *checksum = "01234567890123456789012345678901";
   g_autofree char *source_checksum = NULL;
-  gs_unref_object OstreeMutableTree *source_subdir = NULL;
+  glnx_unref_object OstreeMutableTree *source_subdir = NULL;
   g_autofree char *source_checksum2 = NULL;
-  gs_unref_object OstreeMutableTree *source_subdir2 = NULL;
+  glnx_unref_object OstreeMutableTree *source_subdir2 = NULL;
 
   g_assert (ot_util_path_split_validate (pathname, &split_path, &error));
 
@@ -109,15 +109,15 @@ test_ensure_parent_dirs (void)
 static void
 test_ensure_dir (void)
 {
-  gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
-  gs_unref_object OstreeMutableTree *parent = NULL;
+  glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+  glnx_unref_object OstreeMutableTree *parent = NULL;
   gs_unref_ptrarray GPtrArray *split_path = NULL;
   GError *error = NULL;
   const char *dirname = "foo";
   const char *filename = "bar";
   const char *checksum = "01234567890123456789012345678901";
   g_autofree char *source_checksum = NULL;
-  gs_unref_object OstreeMutableTree *source_subdir = NULL;
+  glnx_unref_object OstreeMutableTree *source_subdir = NULL;
 
   g_assert (ostree_mutable_tree_ensure_dir (tree, dirname, &parent, &error));
   g_assert (ostree_mutable_tree_lookup (tree, dirname, &source_checksum, &source_subdir, &error));
@@ -129,8 +129,8 @@ test_ensure_dir (void)
 static void
 test_replace_file (void)
 {
-  gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
-  gs_unref_object OstreeMutableTree *parent = NULL;
+  glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+  glnx_unref_object OstreeMutableTree *parent = NULL;
   gs_unref_ptrarray GPtrArray *split_path = NULL;
   GError *error = NULL;
   const char *filename = "bar";
@@ -140,7 +140,7 @@ test_replace_file (void)
   g_assert (ostree_mutable_tree_replace_file (tree, filename, checksum, &error));
   {
     g_autofree char *out_checksum = NULL;
-    gs_unref_object OstreeMutableTree *subdir = NULL;
+    glnx_unref_object OstreeMutableTree *subdir = NULL;
     g_assert (ostree_mutable_tree_lookup (tree, filename, &out_checksum, &subdir, &error));
     g_assert_cmpstr (checksum, ==, out_checksum);
   }
@@ -148,7 +148,7 @@ test_replace_file (void)
   g_assert (ostree_mutable_tree_replace_file (tree, filename, checksum2, &error));
   {
     g_autofree char *out_checksum = NULL;
-    gs_unref_object OstreeMutableTree *subdir = NULL;
+    glnx_unref_object OstreeMutableTree *subdir = NULL;
     g_assert (ostree_mutable_tree_lookup (tree, filename, &out_checksum, &subdir, &error));
     g_assert_cmpstr (checksum2, ==, out_checksum);
   }
@@ -159,8 +159,8 @@ test_contents_checksum (void)
 {
   const char *checksum = "01234567890123456789012345678901";
   const char *subdir_checksum = "ABCD0123456789012345678901234567";
-  gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
-  gs_unref_object OstreeMutableTree *subdir = NULL;
+  glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+  glnx_unref_object OstreeMutableTree *subdir = NULL;
   GError *error = NULL;
   g_assert_null (ostree_mutable_tree_get_contents_checksum (tree));